<!DOCTYPE html>
<meta charset="utf-8">
<title>Select UTF-8-named files in a file input</title>
<link rel="help"
      href="https://html.spec.whatwg.org/multipage/input.html#file-upload-state-(type=file)">
<link rel="author" title="Benjamin C. Wiley Sittler"
      href="mailto:bsittler@chromium.org">
<script src="../../../../resources/testharness.js"></script>
<script src="../../../../resources/testharnessreport.js"></script>
<script src="resources/select-dragged-file-input-helper.js"></script>
<!--

 NOTE: Blink renderer crashes are expected on non-Windows hosts using
 filenames containing characters from outside ASCII. Use a UTF-8
 locale to prevent this, e.g. with:

 bash$ export LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8

 Any other locale should work too provided it uses UTF-8 character
 encoding.

 Test failures are expected on Windows when using any system "ANSI"
 codepage other than windows-1252. To fix this, upgrade your system's
 Win32.pm Perl module to the latest version.

  -->
<script>
'use strict';

fileInputTest({
  fileNameSource: 'ASCII',
  fileBaseName: 'file-for-drag-to-send3.txt',
});

fileInputTest({
  fileNameSource: 'x-user-defined',
  fileBaseName: 'file-for-drag-to-send3-\uF7F0\uF793\uF783\uF7A0.txt',
});

fileInputTest({
  fileNameSource: 'JIS X 0201 and JIS X 0208',
  fileBaseName: 'file-for-drag-to-send3-★星★.txt',
});

fileInputTest({
  fileNameSource: 'Unicode',
  fileBaseName: 'file-for-drag-to-send3-☺😂.txt',
});

fileInputTest({
  fileNameSource: 'Unicode',
  fileBaseName: `file-for-drag-to-send3-${kTestChars}.txt`,
});

</script>
